package com.woniuxy.cloud.carl.carlstation.client;

import com.woniuxy.cloud.carl.carlstation.client.dto.StaffDto;
import com.woniuxy.cloud.carl.carlstation.client.param.AddStaffParam;
import com.woniuxy.cloud.carl.carlstation.client.param.FindStaffByConditionParam;
import com.woniuxy.cloud.carl.carlstation.client.param.ManagerPhoneLoginParam;
import com.woniuxy.cloud.carl.carlstation.client.param.ModifyStaffParam;
import com.woniuxy.result.Result;
import com.woniuxy.utils.MyPage;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import java.util.List;

@FeignClient(contextId = "StaffClient",name="carlstation")
public interface StaffClient {

    @PostMapping("/addStaff")
    public Result addStaff(@RequestBody AddStaffParam param);
@PostMapping("/findStaffByCondition")
public Result<MyPage<StaffDto>> findStaffByCondition(@RequestBody FindStaffByConditionParam param);
    @GetMapping("/findStaffsByStoreId")
public Result<List<StaffDto>> findStaffsByStoreId(@RequestParam("storeId") Long storeId);
@GetMapping("/findStaffById")
public Result<StaffDto> findStaffById(@RequestParam("staffId") Long staffId);

@PostMapping("/modifyStaff")
public Result modifyStaff(@RequestBody @Valid ModifyStaffParam param);

@PostMapping("/managerLogin")
public  Result<String> managerLogin(@RequestBody ManagerPhoneLoginParam param);

    @GetMapping("/managerSendLogCode")
    public Result sendLoginCode(@RequestParam("managerPhone") String managerPhone);



}
